package edu.ubb.remeye.gui.event.manager;

import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

import edu.ubb.remeye.control.Control;
import edu.ubb.remeye.gui.event.EventType;

/**
 * Class for managing key events.
 * 
 * @author Andrew Ianicicau
 *
 */
public class KeyEventManager extends KeyAdapter {

	///////////////////////////////////////////////////////////////////////////////////
	////		METHODS - KeyEventManager
	///////////////////////////////////////////////////////////////////////////////////
	
	/**
	 * Send a KEY_PRESSED event when a key is pressed.
	 */
	@Override
	public void keyPressed(KeyEvent e) {
		Control.sendEvent(EventType.KEY_PRESSED, e);
	}

	/**
	 * Sends a KEY_RELEASED event when a key is released.
	 */
	@Override
	public void keyReleased(KeyEvent e) {
		Control.sendEvent(EventType.KEY_RELEASED, e);
	}

}
